﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EndlessGalaxy
{
    public class Facility
    {
        //public string name;
        public Int64 population;//??????
        public int level;
        public List<Cargo> input;
        public List<Cargo> output;
        public bool shipbuilder;
        public bool solar;
        public bool miner;
        public int location;

        public Facility(int lev, List<Cargo> inp, List<Cargo> outp)
        {
            level = lev;
            input = inp;
            output = outp;
            shipbuilder = false;
            solar = false;
            miner = false;
        }

        /// <summary>
        /// New facility, for anything other than simple factory or molecular foundry
        /// </summary>
        /// <param name="lev">The level of the facility</param>
        /// <param name="stuff">The items as input or output</param>
        /// <param name="mode">'m' for miner, or 's' for solar</param>
        public Facility(int lev, List<Cargo> stuff, char mode)
        {
            level = lev;
            output = stuff;
            input = stuff;
            shipbuilder = false;
            solar = (mode == 's');
            miner = (mode == 'm');
        }

        /// <summary>
        /// New facility, for shipyard
        /// </summary>
        /// <param name="lev">The level of the facility</param>
        /// <param name="mode">Any character works, to make it a shipyard</param>
        public Facility(int lev, char mode)
        {
            level = lev;
            shipbuilder = true;
            solar = false;
            miner = false;
        }
    }
}
